{include file="public/toper" /}
<div class="x-body layui-anim layui-anim-up">
    <blockquote class="layui-elem-quote">欢迎管理员：
        <span class="x-red">{$Think.session.admin_user.name}</span>   <span id="nowTime"></span></blockquote>
    <fieldset class="layui-elem-field">
        <legend>数据统计</legend>
        <div class="layui-field-box">
            <div class="layui-col-md12">
                <div class="layui-card">
                    <div class="layui-card-body">
                        <div class="layui-carousel x-admin-carousel x-admin-backlog" lay-anim="" lay-indicator="inside" lay-arrow="none" style="width: 100%; height: 90px;">
                            <div carousel-item="">
                                <ul class="layui-row layui-col-space10 layui-this">
                                    <li class="layui-col-xs2">
                                        <a href="javascript:;" class="x-admin-backlog-body">
                                            <h3>门店数</h3>
                                            <p>
                                                <cite>{$store}</cite></p>
                                        </a>
                                    </li>
                                    <li class="layui-col-xs2">
                                        <a href="javascript:;" class="x-admin-backlog-body">
                                            <h3>商品数</h3>
                                            <p>
                                                <cite>{$goods}</cite></p>
                                        </a>
                                    </li>
                                    <li class="layui-col-xs2">
                                        <a href="javascript:;" class="x-admin-backlog-body">
                                            <h3>标签数</h3>
                                            <p>
                                                <cite>{$label}</cite></p>
                                        </a>
                                    </li>
                                    <li class="layui-col-xs2">
                                        <a href="javascript:;" class="x-admin-backlog-body">
                                            <h3>物料数</h3>
                                            <p>
                                                <cite>{$materiel}</cite></p>
                                        </a>
                                    </li>
                                    <li class="layui-col-xs2">
                                        <a href="javascript:;" class="x-admin-backlog-body">
                                            <h3>订单数</h3>
                                            <p>
                                                <cite>{$order}</cite></p>
                                        </a>
                                    </li>
                                </ul>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </fieldset>
    <fieldset class="layui-elem-field">
        <legend>系统信息</legend>
        <div class="layui-field-box">
            <table class="layui-table">
                <tbody>
                <tr>
                    <th>后台版本</th>
                    <td>1.2</td></tr>
                <tr>
                    <th>服务器域名/IP地址</th>
                    <td>{:$_SERVER['SERVER_NAME'].' [ '.gethostbyname($_SERVER['SERVER_NAME']).' ]'}</td></tr>
                <tr>
                    <th>服务器标识</th>
                    <td>{:php_uname()}</td></tr>
                <tr>
                    <th>服务器语言</th>
                    <td>{:$_SERVER['HTTP_ACCEPT_LANGUAGE']}</td></tr>
                <tr>
                    <th>服务器解译引擎</th>
                    <td>{:function_exists('apache_get_version')?apache_get_version():$_SERVER["SERVER_SOFTWARE"]}</td></tr>
                <tr>
                    <th>PHP版本</th>
                    <td>PHP {:phpversion()}</td></tr>
                <tr>
                    <th>PHP运行方式</th>
                    <td>{:php_sapi_name()}</td></tr>
                <tr>
                    <th>上传文件最大限制</th>
                    <td>{:ini_get('upload_max_filesize')}</td></tr>
                <tr>
                    <th>POST方法提交最大限制</th>
                    <td>{:ini_get('post_max_size')}</td></tr>
                <tr>
                    <th>脚本超时时间</th>
                    <td>{:ini_get('max_execution_time').'秒'}</td></tr>
                <tr>
                    <th>数据库信息</th>
                    <td> MySQL {$mysql}</td></tr>
                <tr>
                    <th>剩余空间</th>
                    <td>{:round((disk_free_space(".")/(1024*1024)),2).'M'}</td></tr>
                <tr>
                    <th>ThinkPHP版本</th>
                    <td> {:THINK_VERSION}</td></tr>
                </tbody>
            </table>
        </div>
    </fieldset>
</div>
    <script>
        //获取系统时间
        var newDate = '';
        getLangDate();
        //值小于10时，在前面补0
        function dateFilter(date){
            if(date < 10){return "0"+date;}
            return date;
        }
        function getLangDate(){
            var dateObj = new Date(); //表示当前系统时间的Date对象
            var year = dateObj.getFullYear(); //当前系统时间的完整年份值
            var month = dateObj.getMonth()+1; //当前系统时间的月份值
            var date = dateObj.getDate(); //当前系统时间的月份中的日
            var day = dateObj.getDay(); //当前系统时间中的星期值
            var weeks = ["星期日","星期一","星期二","星期三","星期四","星期五","星期六"];
            var week = weeks[day]; //根据星期值，从数组中获取对应的星期字符串
            var hour = dateObj.getHours(); //当前系统时间的小时值
            var minute = dateObj.getMinutes(); //当前系统时间的分钟值
            var second = dateObj.getSeconds(); //当前系统时间的秒钟值
            var timeValue = "" +((hour >= 12) ? (hour >= 18) ? "晚上" : "下午" : "上午" ); //当前时间属于上午、晚上还是下午
            newDate = dateFilter(year)+"年"+dateFilter(month)+"月"+dateFilter(date)+"日 "+" "+dateFilter(hour)+":"+dateFilter(minute)+":"+dateFilter(second);
            document.getElementById("nowTime").innerHTML = timeValue+"好！当前时间为： "+newDate+"　"+week;
            setTimeout("getLangDate()",1000);
        }
    </script>
